using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class BaseRequest : GeneratedMessageLite<BaseRequest, BaseRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<BaseRequest, BaseRequest.Builder>
		{
			private bool resultIsReadOnly;
			private BaseRequest result;
			protected override BaseRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override BaseRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override BaseRequest DefaultInstanceForType
			{
				get
				{
					return BaseRequest.DefaultInstance;
				}
			}
			public ByteString SessionKey
			{
				get
				{
					return this.result.SessionKey;
				}
				set
				{
					this.SetSessionKey(value);
				}
			}
			public uint Uin
			{
				get
				{
					return this.result.Uin;
				}
				set
				{
					this.SetUin(value);
				}
			}
			public ByteString DeviceID
			{
				get
				{
					return this.result.DeviceID;
				}
				set
				{
					this.SetDeviceID(value);
				}
			}
			public int ClientVersion
			{
				get
				{
					return this.result.ClientVersion;
				}
				set
				{
					this.SetClientVersion(value);
				}
			}
			public ByteString DeviceType
			{
				get
				{
					return this.result.DeviceType;
				}
				set
				{
					this.SetDeviceType(value);
				}
			}
			public uint Scene
			{
				get
				{
					return this.result.Scene;
				}
				set
				{
					this.SetScene(value);
				}
			}
			public Builder()
			{
				this.result = BaseRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(BaseRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private BaseRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					BaseRequest other = this.result;
					this.result = new BaseRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override BaseRequest.Builder Clear()
			{
				this.result = BaseRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override BaseRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new BaseRequest.Builder(this.result);
				}
				return new BaseRequest.Builder().MergeFrom(this.result);
			}
			public override BaseRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override BaseRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is BaseRequest)
				{
					return this.MergeFrom((BaseRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override BaseRequest.Builder MergeFrom(BaseRequest other)
			{
				return this;
			}
			public override BaseRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override BaseRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(BaseRequest._baseRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = BaseRequest._baseRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							this.result.hasSessionKey = input.ReadBytes(ref this.result.sessionKey_);
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasUin = input.ReadUInt32(ref this.result.uin_);
							continue;
						}
					}
					else
					{
						if (num3 <= 32u)
						{
							if (num3 == 26u)
							{
								this.result.hasDeviceID = input.ReadBytes(ref this.result.deviceID_);
								continue;
							}
							if (num3 == 32u)
							{
								this.result.hasClientVersion = input.ReadInt32(ref this.result.clientVersion_);
								continue;
							}
						}
						else
						{
							if (num3 == 42u)
							{
								this.result.hasDeviceType = input.ReadBytes(ref this.result.deviceType_);
								continue;
							}
							if (num3 == 48u)
							{
								this.result.hasScene = input.ReadUInt32(ref this.result.scene_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public BaseRequest.Builder SetSessionKey(ByteString value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasSessionKey = true;
				this.result.sessionKey_ = value;
				return this;
			}
			public BaseRequest.Builder ClearSessionKey()
			{
				this.PrepareBuilder();
				this.result.hasSessionKey = false;
				this.result.sessionKey_ = ByteString.Empty;
				return this;
			}
			public BaseRequest.Builder SetUin(uint value)
			{
				this.PrepareBuilder();
				this.result.hasUin = true;
				this.result.uin_ = value;
				return this;
			}
			public BaseRequest.Builder ClearUin()
			{
				this.PrepareBuilder();
				this.result.hasUin = false;
				this.result.uin_ = 0u;
				return this;
			}
			public BaseRequest.Builder SetDeviceID(ByteString value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasDeviceID = true;
				this.result.deviceID_ = value;
				return this;
			}
			public BaseRequest.Builder ClearDeviceID()
			{
				this.PrepareBuilder();
				this.result.hasDeviceID = false;
				this.result.deviceID_ = ByteString.Empty;
				return this;
			}
			public BaseRequest.Builder SetClientVersion(int value)
			{
				this.PrepareBuilder();
				this.result.hasClientVersion = true;
				this.result.clientVersion_ = value;
				return this;
			}
			public BaseRequest.Builder ClearClientVersion()
			{
				this.PrepareBuilder();
				this.result.hasClientVersion = false;
				this.result.clientVersion_ = 0;
				return this;
			}
			public BaseRequest.Builder SetDeviceType(ByteString value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasDeviceType = true;
				this.result.deviceType_ = value;
				return this;
			}
			public BaseRequest.Builder ClearDeviceType()
			{
				this.PrepareBuilder();
				this.result.hasDeviceType = false;
				this.result.deviceType_ = ByteString.Empty;
				return this;
			}
			public BaseRequest.Builder SetScene(uint value)
			{
				this.PrepareBuilder();
				this.result.hasScene = true;
				this.result.scene_ = value;
				return this;
			}
			public BaseRequest.Builder ClearScene()
			{
				this.PrepareBuilder();
				this.result.hasScene = false;
				this.result.scene_ = 0u;
				return this;
			}
		}
		public const int SessionKeyFieldNumber = 1;
		public const int UinFieldNumber = 2;
		public const int DeviceIDFieldNumber = 3;
		public const int ClientVersionFieldNumber = 4;
		public const int DeviceTypeFieldNumber = 5;
		public const int SceneFieldNumber = 6;
		private static readonly BaseRequest defaultInstance;
		private static readonly string[] _baseRequestFieldNames;
		private static readonly uint[] _baseRequestFieldTags;
		private bool hasSessionKey;
		private ByteString sessionKey_ = ByteString.Empty;
		private bool hasUin;
		private uint uin_;
		private bool hasDeviceID;
		private ByteString deviceID_ = ByteString.Empty;
		private bool hasClientVersion;
		private int clientVersion_;
		private bool hasDeviceType;
		private ByteString deviceType_ = ByteString.Empty;
		private bool hasScene;
		private uint scene_;
		private int memoizedSerializedSize = -1;
		public static BaseRequest DefaultInstance
		{
			get
			{
				return BaseRequest.defaultInstance;
			}
		}
		public override BaseRequest DefaultInstanceForType
		{
			get
			{
				return BaseRequest.DefaultInstance;
			}
		}
		protected override BaseRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public ByteString SessionKey
		{
			get
			{
				return this.sessionKey_;
			}
		}
		public uint Uin
		{
			get
			{
				return this.uin_;
			}
		}
		public ByteString DeviceID
		{
			get
			{
				return this.deviceID_;
			}
		}
		public int ClientVersion
		{
			get
			{
				return this.clientVersion_;
			}
		}
		public ByteString DeviceType
		{
			get
			{
				return this.deviceType_;
			}
		}
		public uint Scene
		{
			get
			{
				return this.scene_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasSessionKey && this.hasUin && this.hasDeviceID && this.hasClientVersion && this.hasDeviceType;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasSessionKey)
				{
					num += CodedOutputStream.ComputeBytesSize(1, this.SessionKey);
				}
				if (this.hasUin)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Uin);
				}
				if (this.hasDeviceID)
				{
					num += CodedOutputStream.ComputeBytesSize(3, this.DeviceID);
				}
				if (this.hasClientVersion)
				{
					num += CodedOutputStream.ComputeInt32Size(4, this.ClientVersion);
				}
				if (this.hasDeviceType)
				{
					num += CodedOutputStream.ComputeBytesSize(5, this.DeviceType);
				}
				if (this.hasScene)
				{
					num += CodedOutputStream.ComputeUInt32Size(6, this.Scene);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private BaseRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] baseRequestFieldNames = BaseRequest._baseRequestFieldNames;
			if (this.hasSessionKey)
			{
				output.WriteBytes(1, baseRequestFieldNames[4], this.SessionKey);
			}
			if (this.hasUin)
			{
				output.WriteUInt32(2, baseRequestFieldNames[5], this.Uin);
			}
			if (this.hasDeviceID)
			{
				output.WriteBytes(3, baseRequestFieldNames[1], this.DeviceID);
			}
			if (this.hasClientVersion)
			{
				output.WriteInt32(4, baseRequestFieldNames[0], this.ClientVersion);
			}
			if (this.hasDeviceType)
			{
				output.WriteBytes(5, baseRequestFieldNames[2], this.DeviceType);
			}
			if (this.hasScene)
			{
				output.WriteUInt32(6, baseRequestFieldNames[3], this.Scene);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasSessionKey)
			{
				num ^= this.sessionKey_.GetHashCode();
			}
			if (this.hasUin)
			{
				num ^= this.uin_.GetHashCode();
			}
			if (this.hasDeviceID)
			{
				num ^= this.deviceID_.GetHashCode();
			}
			if (this.hasClientVersion)
			{
				num ^= this.clientVersion_.GetHashCode();
			}
			if (this.hasDeviceType)
			{
				num ^= this.deviceType_.GetHashCode();
			}
			if (this.hasScene)
			{
				num ^= this.scene_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			BaseRequest baseRequest = value as BaseRequest;
			return baseRequest != null && (this.hasSessionKey == baseRequest.hasSessionKey && (!this.hasSessionKey || this.sessionKey_.Equals(baseRequest.sessionKey_))) && (this.hasUin == baseRequest.hasUin && (!this.hasUin || this.uin_.Equals(baseRequest.uin_))) && (this.hasDeviceID == baseRequest.hasDeviceID && (!this.hasDeviceID || this.deviceID_.Equals(baseRequest.deviceID_))) && (this.hasClientVersion == baseRequest.hasClientVersion && (!this.hasClientVersion || this.clientVersion_.Equals(baseRequest.clientVersion_))) && (this.hasDeviceType == baseRequest.hasDeviceType && (!this.hasDeviceType || this.deviceType_.Equals(baseRequest.deviceType_))) && (this.hasScene == baseRequest.hasScene && (!this.hasScene || this.scene_.Equals(baseRequest.scene_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<BaseRequest, BaseRequest.Builder>.PrintField("SessionKey", this.hasSessionKey, this.sessionKey_, writer);
			GeneratedMessageLite<BaseRequest, BaseRequest.Builder>.PrintField("Uin", this.hasUin, this.uin_, writer);
			GeneratedMessageLite<BaseRequest, BaseRequest.Builder>.PrintField("DeviceID", this.hasDeviceID, this.deviceID_, writer);
			GeneratedMessageLite<BaseRequest, BaseRequest.Builder>.PrintField("ClientVersion", this.hasClientVersion, this.clientVersion_, writer);
			GeneratedMessageLite<BaseRequest, BaseRequest.Builder>.PrintField("DeviceType", this.hasDeviceType, this.deviceType_, writer);
			GeneratedMessageLite<BaseRequest, BaseRequest.Builder>.PrintField("Scene", this.hasScene, this.scene_, writer);
		}
		public static BaseRequest ParseFrom(byte[] data)
		{
			return BaseRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private BaseRequest MakeReadOnly()
		{
			return this;
		}
		public static BaseRequest.Builder CreateBuilder()
		{
			return new BaseRequest.Builder();
		}
		public override BaseRequest.Builder ToBuilder()
		{
			return BaseRequest.CreateBuilder(this);
		}
		public override BaseRequest.Builder CreateBuilderForType()
		{
			return new BaseRequest.Builder();
		}
		public static BaseRequest.Builder CreateBuilder(BaseRequest prototype)
		{
			return new BaseRequest.Builder(prototype);
		}
		static BaseRequest()
		{
			BaseRequest.defaultInstance = new BaseRequest().MakeReadOnly();
			BaseRequest._baseRequestFieldNames = new string[]
			{
				"ClientVersion",
				"DeviceID",
				"DeviceType",
				"Scene",
				"SessionKey",
				"Uin"
			};
			BaseRequest._baseRequestFieldTags = new uint[]
			{
				32u,
				26u,
				42u,
				48u,
				10u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.BaseRequest.Descriptor, null);
		}
	}
}
